FROM ubuntu:bionic

LABEL manitainer="gaodemian@sina.com"

ENV TZ="Asia/Shanghai"
ENV DEBIAN_FRONTEND noninteractive

ENV DM2016_RT="/home/dm/dm2016"
ENV DM2016_DEV="/home/dm/dm_runtime"
ENV DB_TYPE="sqlite"

COPY sources.tsinghua.list /etc/apt/sources.list

RUN apt update \
 && apt install -y --fix-missing g++ cxxtest cmake libboost-all-dev libsqlite3-dev xrdp xfce4 xfce4-goodies\
 && apt install -y --fix-missing qt4-dev-tools \
 && apt install -y apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy \
 && apt clean \
 && useradd -d /home/dm -m -s /bin/bash dm \
 && mkdir -p /home/dm/dm2016 \
 && ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
 && dpkg-reconfigure -f noninteractive tzdata
 
COPY xrdp.ini /etc/xrdp/xrdp.ini
COPY startwm.sh /etc/xrdp/startwm.sh
COPY xsession /home/dm/.xsession
COPY bashrc /home/dm/.bashrc

WORKDIR /home/dm